/**
 * Created by qiangxl on 2016/12/27.
 */

//连接数据库
//引入数据库的配置文件
var  settings = require('../setting');
//引入链接数据库的mongodb模块
var Db = require('mongodb').Db;
var Connection = require('mongodb').Connection;
var Server = require('mongodb').Server;
module.exports = new Db(settings.db,
      new Server(settings.host,settings.port),
      {safe:true}
)